package com.old.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.old.dto.VideoInsertDTO;
import com.old.dto.VideoQueryDTO;
import com.old.result.PageBean;
import com.old.vo.VideoVO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface VideoService {
    void addVideo(VideoInsertDTO videoInsertDTO);


    //查询戏曲内容详情
    VideoVO getVideoDetail(Integer videoId, Integer userId);


    PageBean getVideoList(Integer pageNo, Integer pageSize, Integer sortBy, String searchTerms, Integer userId) throws JsonProcessingException;

    //查询戏曲列表-支持条件查询-分页
    PageBean getVideoListById(VideoQueryDTO videoQueryDTO);


    @Transactional
    void deleteVideo(Integer videoId,Integer userId);

    PageBean pageList(Integer pageNo, Integer pageSize, Integer sortBy, String searchTerms, Integer userId) throws JsonProcessingException;

    //点赞
    @Transactional
    Integer likeVideo(Integer videoId, Integer userId);

    //取消点赞
    @Transactional
    Integer cancelLike(Integer videoId, Integer userId);

    //判断查看者是否点赞
    boolean isGood(Integer userId, Integer id);

    void deleteVideosByIds(List<Integer> ids);
}
